﻿using System;
using System.Collections.Generic;
using System.Text;
using CTEM.Controllers.DAO;
using CTEM.Models;

namespace CTEM.Controllers.BUS
{
    class WorkerBUS
    {
        private WorkerDAO _workerDAO = new WorkerDAO();
        public List<WorkerDTO> LoadAllWks(long id)
        {
            return _workerDAO.LoadAllWks(id);
        }
        public long CreateWks(WorkerDTO dto)
        {
            return _workerDAO.CreateWks(dto);
        }
        public bool updateAllWks(long workerSalaryID)
        {
            return _workerDAO.updateAllWks(workerSalaryID);
        }
        public bool updateWks(WorkerDTO dto)
        {
            return _workerDAO.updateWks(dto);
        }
        public bool delete(long id)
        {
            return _workerDAO.delete(id);
        }
        public bool CreateDayWorking(DayWorkingDTO dto){
            return _workerDAO.CreateDayWorking(dto);
        }
        public List<DayWorkingDTO> LoadAllDaysWorking(long id)
        {
            return _workerDAO.LoadAllDaysWorking(id);
        }
        public WorkerDTO LoadWorkerByID(long id)
        {
            return _workerDAO.LoadWorkerByID(id);
        }
        public long sumTotal(long ID)
        {
            return _workerDAO.sumTotal(ID);
        }
        public bool updateDayWorking(DayWorkingDTO dayWorking)
         {
            return _workerDAO.updateDayWorking(dayWorking);
        }
    }
}
